<?php
use yii\helpers\Url;
?>
<script src="/assets/js/echarts.min.js"></script>
<script type="text/javascript" src="/lib/jquery.raty.min.js"></script>
<div style="background: #2DAD5E;text-align: center;height: 2rem;line-height: 2rem;color: #fff">

    <p><?=$area->areaname?>垃圾分类总体信息</p>

</div>
<div class="weui-cells__title">覆盖户数及参与率</div>


<div class="weui-cells weui-cells_form">

        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label"><?=$area->areaname?></label></div>
            <div class="weui-cell__bd">
                <div class="weui-progress">
                    <div class="weui-progress__bar">
                        <div class="weui-progress__inner-bar js_progress" style="width: 80%;"></div>
                    </div>
                    <span style="font-size: 0.6rem"> 123/144 </span>
                </div>
            </div>
        </div>

</div>

<div class="weui-cells__title">分类回收量</div>

    <div id="main" style="width:100%;height: 15rem"></div>
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '<?=$area->areaname?>'
            },
            tooltip: {},
            legend: {
                data:['回收量']
            },
            xAxis: {
                data: ["厨余","可回收","有害","大件","其他"]
            },
            yAxis: {},
            series: [{
                name: '回收量',
                type: 'bar',
                data: [5, 20, 36, 10, 10]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>


<div class="weui-cells__title">分类质量统计</div>


<div class="weui-cells weui-cells_form">

        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label"><?=$area->areaname?></label></div>
            <div class="weui-cell__bd">
                <div id="star"></div>
            </div>
        </div>
        <script>
            $(function () {
                $('#star').raty({
                    number : 5,//星星个数
                    path : '/lib/img',//图片路径
                    half:false,
                    starOn : 'star-on.png',
                    starOff : 'star-off.png',
                    width:"100%",
                    score:5
                });

            })
        </script>

</div>

<div class="weui-cells__title">垃圾分类设施统计</div>
<div class="weui-cells weui-cells_form">

        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label"><?=$area->areaname?></label></div>
            <div class="weui-cell__bd">
                堆肥房:100 <br />小型制肥机：100
            </div>
        </div>


</div>
<div class="weui-cells__title">环保贡献值</div>

<div class="weui-flex" style="text-align: center;margin-top: 1rem">

    <div class="weui-flex__item"><img style="width: 40%" src="/assets/img/page.png"></div>
    <div class="weui-flex__item"><img style="width: 40%" src="/assets/img/tree.png"></div>
    <div class="weui-flex__item"><img style="width: 40%" src="/assets/img/cloud.png"></div>
</div>
<div class="weui-flex" style="text-align: center">

    <div class="weui-flex__item">纸类回收<br/>50kg</div>
    <div class="weui-flex__item">拯救树木<br/>100颗</div>
    <div class="weui-flex__item">减少碳排放<br/>10000立方米</div>
</div>